/**
 * Created by Jie on 2017/2/4.
 */
var ccap = require('ccap');
var session = require('express-session');

//登录界面
exports.index = function (req,res,next) {
    res.render('login',
        {
            title: 'OS 管理平台 -- 后台登录'
        });
}

//获取验证码
exports.code = function (req,res,next) {
    var captcha = ccap();
    var ary = captcha.get();
    var txt = ary[0];
    var buf = ary[1];
    req.session.code = txt;
    res.end(buf);
}

//权限控制返回
exports.auth = function (req,res,next) {
    res.render('auth',
        {
            title: 'OS 管理平台 -- 您无权访问'
        });
}